﻿using System;
using System.Collections.Generic;
using System.Text;
using DataEntities.Base;

namespace DataEntities
{
    public class District:BusinesObjectBase
    {
        private string _name;
        private IList<Dogovor> _dogovorList;

        public virtual string Name { get { return _name; } set { _name = value; } }

        public virtual IList<Dogovor> DogovorList { get { return _dogovorList; } set { _dogovorList=value; } }

        protected District() : this("")
        {
        }

        public District(string name) : this(0,name)
        {
        }

        public District(int id,string name):base(id)
        {
            _name = name;
        }

        public override bool Equals(object obj)
        {
            return base.Equals(obj) && this.Name == ((District)obj).Name;
        }
    }
}
